package com.example.g5project.chat.model.result;

import com.example.g5project.chat.constant.ImBaseConstant;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

@Data
public class MessageSendResult {

    @JsonProperty("ActionStatus")
    private String actionStatus;

    @JsonProperty("ErrorInfo")
    private String errorInfo;

    @JsonProperty("ErrorCode")
    private Integer errorCode;

    @JsonProperty("MsgTime")
    private Integer msgTime;

    @JsonProperty("MsgKey")
    private String msgKey;

    @JsonIgnore
    public Boolean isRight() {
        return ImBaseConstant.ACTION_STATUS_OK.equals(this.actionStatus);
    }
}
